package com.ruoyi.user.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.user.mapper.UserUnlockWechatMapper;
import com.ruoyi.user.domain.UserUnlockWechat;
import com.ruoyi.user.service.IUserUnlockWechatService;

/**
 * 解锁微信记录Service业务层处理
 * 
 * @author DEREK
 * @date 2023-12-14
 */
@Service
public class UserUnlockWechatServiceImpl extends ServiceImpl<UserUnlockWechatMapper, UserUnlockWechat> implements IUserUnlockWechatService 
{
    @Autowired
    private UserUnlockWechatMapper userUnlockWechatMapper;

    /**
     * 查询解锁微信记录
     * 
     * @param id 解锁微信记录主键
     * @return 解锁微信记录
     */
    @Override
    public UserUnlockWechat selectUserUnlockWechatById(Long id)
    {
        return userUnlockWechatMapper.selectUserUnlockWechatById(id);
    }

    /**
     * 查询解锁微信记录列表
     * 
     * @param userUnlockWechat 解锁微信记录
     * @return 解锁微信记录
     */
    @Override
    public List<UserUnlockWechat> selectUserUnlockWechatList(UserUnlockWechat userUnlockWechat)
    {
        return userUnlockWechatMapper.selectUserUnlockWechatList(userUnlockWechat);
    }

    /**
     * 新增解锁微信记录
     * 
     * @param userUnlockWechat 解锁微信记录
     * @return 结果
     */
    @Override
    public int insertUserUnlockWechat(UserUnlockWechat userUnlockWechat)
    {
        userUnlockWechat.setCreateTime(DateUtils.getNowDate());
        return userUnlockWechatMapper.insertUserUnlockWechat(userUnlockWechat);
    }

    /**
     * 修改解锁微信记录
     * 
     * @param userUnlockWechat 解锁微信记录
     * @return 结果
     */
    @Override
    public int updateUserUnlockWechat(UserUnlockWechat userUnlockWechat)
    {
        userUnlockWechat.setUpdateTime(DateUtils.getNowDate());
        return userUnlockWechatMapper.updateUserUnlockWechat(userUnlockWechat);
    }

    /**
     * 批量删除解锁微信记录
     * 
     * @param ids 需要删除的解锁微信记录主键
     * @return 结果
     */
    @Override
    public int deleteUserUnlockWechatByIds(Long[] ids)
    {
        return userUnlockWechatMapper.deleteUserUnlockWechatByIds(ids);
    }

    /**
     * 删除解锁微信记录信息
     * 
     * @param id 解锁微信记录主键
     * @return 结果
     */
    @Override
    public int deleteUserUnlockWechatById(Long id)
    {
        return userUnlockWechatMapper.deleteUserUnlockWechatById(id);
    }
}
